package com.easyweb.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.easyweb.dao.BaseDao;
import com.easyweb.dao.FriendLinkDao;
import com.easyweb.model.FriendLink;

@Repository
public class FriendLinkDaoImpl extends BaseDao implements FriendLinkDao{

	public int insertFriendLink(FriendLink friendLink) {
		return getSqlSession().insert("friendlink.insertFriendLink", friendLink);
	}

	public int updateFriendLink(FriendLink friendLink) {
		return getSqlSession().update("friendlink.updateFriendLinkById", friendLink);
	}

	public int deleteFriendLink(Map<String, Object> map) {
		return getSqlSession().delete("friendlink.deleteFriendLinkById", map);
	}

	public List<FriendLink> getFriendLinks(Map<String, Object> map) {
		return getSqlSession().selectList("friendlink.selectFriendLinks", map);
	}

	public FriendLink getFriendLinkById(Map<String, Object> map) {
		return getSqlSession().selectOne("friendlink.selectFriendLinks", map);
	}

}
